<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<div id="content_work">
	<!-- 컨텐츠 -->
	<div class="work_contents">
		<h1>
			<img src="images/title_newcomer.gif" alt="타이틀 이미지">
		</h1>
		<ul class="new_menu">
			<li><a href=""><img
					src="images/tab01.gif" alt="기본 학력사항"></a></li>
			<li><a href=""><img
					src="images/tab02.gif" alt="경력사항"></a></li>
			<li><a href=""><img
					src="images/tab03.gif" alt="외국어자격"></a></li>
			<li><img src="images/tab04_a.gif" alt="자기소개"></li>
			<li class="last"><a
				href=""><img
					src="images/tab05.gif" alt="제출하기"></a></li>
		</ul>
		<p>
			<img src="images/txt01.gif"
				alt="각단계마다 지원서를 저장하시면 모든 단계의 내용을 수정/삭제 하실수 있습니다. 제출을 선택하면 최종 입사지원이 완료되어 수정및삭제가 불가능하니 유의하시기 바랍니다.">
		</p>
		<!-- 자기소개 -->
		<div class="self">
			<div class="recruit_title">
				&nbsp;(신입/일반)</div>
			<br> <b>*&nbsp;표시 항목들은 저장 후 다음단계로 넘어가기 위해 필수적으로 기입하셔야 합니다. <br>최종제출(최종지원)을
				위해서는 *&nbsp;없는 항목까지 전 항목 기입하셔야 합니다.
			</b> <br>
			<form id="form" >
			<input type="hidden" name="app_num" value="${sessionScope.app_num }">
			<dl id="divText18" style="display: block;">
				<dt>
					*&nbsp;1. ${self.self_intro_nm1} <span
						id="idJobMeaning" class="kor" style="color: 990000"></span>
				</dt>
				<dd>
					<label> <textarea id="self_intro1" name="self_intro1" id="textarea"
							cols="45" rows="3" style="width: 690px; height: 50px;"
							class="new_textarea"
							></textarea>
					</label>
				</dd>
			</dl>

			<dl id="divText18" style="display: block;">
				<dt>
					*&nbsp;2. ${self.self_intro_nm2} <span
						id="idJobMeaning" class="kor" style="color: 990000"></span>
				</dt>
				<dd>
					<label> <textarea id="self_intro2" name="self_intro2" id="textarea"
							cols="45" rows="3" style="width: 690px; height: 50px;"
							class="new_textarea"
							></textarea>
					</label>
				</dd>
			</dl>

			<dl id="divText18" style="display: block;">
				<dt>
					*&nbsp;3. ${self.self_intro_nm3} <span
						id="idJobMeaning" class="kor" style="color: 990000"></span>
				</dt>
				<dd>
					<label> <textarea id="self_intro3" name="self_intro3" id="textarea"
							cols="45" rows="3" style="width: 690px; height: 50px;"
							class="new_textarea"
							></textarea>
					</label>
				</dd>
			</dl>

			<dl id="divText18" style="display: block;">
				<dt>
					*&nbsp;4. ${self.self_intro_nm4} <span
						id="idJobMeaning" class="kor" style="color: 990000"></span>
				</dt>
				<dd>
					<label> <textarea id="self_intro4" name="self_intro4" id="textarea"
							cols="45" rows="3" style="width: 690px; height: 50px;"
							class="new_textarea"
							></textarea>
					</label>
				</dd>
			</dl>

			<dl id="divText18" style="display: block;">
				<dt>
					*&nbsp;5. ${self.self_intro_nm5} <span
						id="idJobMeaning" class="kor" style="color: 990000"></span>
				</dt>
				<dd>
					<label> <textarea id="self_intro5" name="self_intro5" id="textarea"
							cols="45" rows="3" style="width: 690px; height: 50px;"
							class="new_textarea"
							></textarea>
					</label>
				</dd>
			</dl>
	</form>
			<div id="winWaiting" style="display: none;">
				<table width="710" border="0" cellspacing="0" cellpadding="0"
					height="100%">
					<tbody>
						<tr>
							<td valign="middle" align="center">
								<table width="300" border="0" cellspacing="1" cellpadding="0"
									align="center" bgcolor="#ffffff">
									<tbody>
										<tr>
											<td
												style="background-color: #ffffff; border: 1px solid #c6c6ab;">
												<table width="300" border="0" cellspacing="0"
													cellpadding="0">
													<tbody>
														<tr>
															<td height="30" align="center">잠시만 기다려 주십시오.</td>
														</tr>
													</tbody>
												</table>
											</td>
										</tr>
									</tbody>
								</table>
							</td>
						</tr>
					</tbody>
				</table>
			</div>
			<div class="al_c ma_t30">
				<img id="self_save" src="images/btn_save.gif"
					alt="저장" style="cursor: pointer;"> 
					<a href="javascript:senditNextSubmit('${sessionScope.app_num }');"><img
					src="images/btn_next.gif" alt="다음"></a>
			</div>
		</div>
		<!-- 컨텐츠 -->
	</div>
</div>
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script type="text/javascript">
	function senditNextSubmit(url) {
		location.href = "app_submit_insert.do?app_num="+url;
	}
	$(function(){
		$("#self_save").click(function(){
			if($("#self_intro1").val()==""){
				alert("자기소개 1번항목을입력하세요")
			}else if($("#self_intro2").val()==""){
				alert("자기소개 2번항목을입력하세요")
			}else if($("#self_intro3").val()==""){
				alert("자기소개 3번항목을입력하세요")
			}else if($("#self_intro4").val()==""){
				alert("자기소개 4번항목을입력하세요")
			}else if($("#self_intro5").val()==""){
				alert("자기소개 5번항목을입력하세요")
			}else{
				$.ajax({
					url : "app_self_insertok.do",
					dataType : "text",
					type:"post",
					data : $("#form").serialize(),
					success : function(data) {
						
						alert(data);
					},
					error : function(request, status, error) {

						console.log("code:" + request.status + "\n"
								+ "message:" + request.responseText + "\n"
								+ "error:" + error);
					}
				});
			}
		
		});
	});
	
</script>
